Skip to content

fix: support including by commit sha over http - #1910

Merged
firecow merged 3 commits into
masterfrom
fix/include-by-commit-sha
Aug 2, 2026
Merged

fix: support including by commit sha over http#1910
firecow merged 3 commits into
masterfrom
fix/include-by-commit-sha

Conversation

@firecow

@firecow firecow commented Jul 31, 2026

Copy link
Copy Markdown
Owner

git clone --branch cannot resolve a commit sha, so a project or component include pinned to one always failed to fetch; a 40-hex ref is now fetched explicitly and checked out from FETCH_HEAD. Fixes #1800.


Summary by cubic

Includes pinned to a commit SHA over HTTP work; we detect 40‑char SHAs case‑insensitively, skip git clone --branch, fetch the commit, and checkout FETCH_HEAD, with an integration test. Fixes #1800.

Written for commit b0997ef. Summary will update on new commits.

Review in cubic

git clone --branch cannot resolve a commit sha, so a 40-hex ref is now
fetched explicitly and checked out from FETCH_HEAD.
@firecow firecow self-assigned this Jul 31, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/parser-includes.ts">

<violation number="1" location="src/parser-includes.ts:380">
P2: The commit SHA regex `/^[0-9a-f]{40}$/` only matches lowercase hex, so an uppercase commit SHA fails detection and falls back to the `--branch` path that cannot resolve a commit SHA. Add the `i` flag: `/^[0-9a-f]{40}$/i`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/parser-includes.ts Outdated
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@firecow
firecow merged commit a5bb1a3 into master Aug 2, 2026
16 checks passed
@firecow
firecow deleted the fix/include-by-commit-sha branch August 2, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Included project can't be fetched when git hash is used as ref

1 participant